<?php
/**************************************************************************
 *
 *   Copyright 2010 American Public Media Group
 *
 *   This file is part of AIR2.
 *
 *   AIR2 is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   AIR2 is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with AIR2.  If not, see <http://www.gnu.org/licenses/>.
 *
 *************************************************************************/

/*
|--------------------------------------------------------------------------
| AIR2 Project View
|--------------------------------------------------------------------------
| Load inline data for the project profile page
|   $base_url - base url of this project
|   $sub_srch - search url for project's submissions
|   $inq_srch - search url for project's inquiries
|   $src_srch - search url for project's sources
|
|   $proj     - json of this project
|   $subm     - json for project's submissions
|   $inq      - json for the project's inquiries
|   $org      - json for the project's organizations
|   $out      - json for the project's outcomes
|   $stats    - json for the project's statistics
|   $annot    - json for the project's annotations
|   $act      - json for the project's activity
|   $tag      - json for the project's tags
|
*/
?>
<script type="text/javascript">
    AIR2.Project.BASEURL   = <?php echo isset($base_url) ? "'$base_url'" : 'null'; ?>;
    AIR2.Project.SUBMSRCH  = <?php echo isset($sub_srch) ? "'$sub_srch'" : 'null'; ?>;
    AIR2.Project.INQSRCH   = <?php echo isset($inq_srch) ? "'$inq_srch'" : 'null'; ?>;
    AIR2.Project.SRCSRCH   = <?php echo isset($src_srch) ? "'$src_srch'" : 'null'; ?>;    

    AIR2.Project.SUMMDATA  = <?php echo isset($proj)  ? json_encode($proj)  : 'null'; ?>;
    AIR2.Project.SUBMDATA  = <?php echo isset($subm)  ? json_encode($subm)  : 'null'; ?>;
    AIR2.Project.INQDATA   = <?php echo isset($inq)   ? json_encode($inq)   : 'null'; ?>;
    AIR2.Project.ORGDATA   = <?php echo isset($org)   ? json_encode($org)   : 'null'; ?>;
    AIR2.Project.OUTDATA   = <?php echo isset($out)   ? json_encode($out)   : 'null'; ?>;
    AIR2.Project.STATSDATA = <?php echo isset($stats) ? json_encode($stats) : 'null'; ?>;
    AIR2.Project.ANNOTDATA = <?php echo isset($annot) ? json_encode($annot) : 'null'; ?>;
    AIR2.Project.ACTIVDATA = <?php echo isset($act)   ? json_encode($act)   : 'null'; ?>;
    AIR2.Project.TAGDATA   = <?php echo isset($tag)   ? json_encode($tag)   : 'null'; ?>;

    Ext.onReady(AIR2.Project);
</script>
